package com.yaoli.ajob;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by siemens on 4/6/2017.
 */
public class _260_SingleNumberIII {
    public int[] singleNumber(int[] nums) {
        Map<Integer,Integer> map = new HashMap<Integer,Integer>();

        for(int i = 0 ; i < nums.length ; i++){
            if(map.containsKey(nums[i])){
                map.remove(nums[i]);
            }else{
                map.put(nums[i],1);
            }
        }

        int numss [] = new int[2];

        int i = 0;

        for(Integer c : map.keySet()){
            numss[i] = c;
            i++;
        }

        return numss;
    }
}
